﻿<body>
    <center><h1>
	<br><a rel="nofollow" href="javascript:window.parent.location = 'http://incoming.blueink.org/blog/tuiyanwang'" title="主页"><img src="logo.jpg" alt="主页" />
	<br></a><a rel="nofollow" href="javascript:window.parent.location = 'http://incoming.blueink.org/blog/tuiyanwang'">推研网</a></h1></div>
	    </h1>
	<?php
/***************** 进行客户端能否访问本网站校验 ************/

// 获取客户端IP
if(getenv('HTTP_CLIENT_IP')) {
$client_ip = getenv('HTTP_CLIENT_IP');
} elseif(getenv('HTTP_X_FORWARDED_FOR')) {
$client_ip = getenv('HTTP_X_FORWARDED_FOR');
} elseif(getenv('REMOTE_ADDR')) {
$client_ip = getenv('REMOTE_ADDR');
} else {
$client_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
}

// 分解客户端IP
$cip = explode(".", $client_ip); 
if (  ($cip[0].".".$cip[1].".".$cip[2]=='166.111.38')
  	||  (   ($cip[0].".".$cip[1]=='59.66')&&($cip[2]<=174)&&($cip[2]>=172)  )
	||  (   ($cip[0].".".$cip[1]=='59.66')&&($cip[2]<=166)&&($cip[2]>=160)  )  ){
	if ( $_GET["grade"] == "2006" ) {
		echo '    </center>';
		include("login.php");
		}
	else echo '
<a rel="nofollow" href="http://incoming.blueink.org/tuiyan2009/redireto05.php" target="_self">进入05级推研网</a>
<a rel="nofollow" href="http://incoming.blueink.org/tuiyan2009/?grade=2006" target="_self">进入06级推研网</a>    </center>';
}
else 
	echo "由于隐私原因，请从紫荆4号楼、紫荆7号楼，或者逸夫技术科学楼访问本站。";

/****************** IP校验结束 ******************/
?>
</body>